package com.coder4j.platform.service;

import com.coder4j.platform.entity.OperationLogEntity;
import com.coder4j.platform.mapper.OperationLogMapper;
import com.coder4j.platform.vo.OperationLogVO;

import com.coder4j.starter.web.BaseServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.beans.BeanUtils;

import lombok.extern.slf4j.Slf4j;

import javax.annotation.Resource;

/**
 * 用户操作日志
 * @author keller
 * @date 2024-05-07 18:24:22
 */
@Service
@Slf4j
public class OperationLogService extends BaseServiceImpl<OperationLogMapper,OperationLogEntity,OperationLogVO>  {

    @Resource
    private OperationLogMapper mapper;

    @Override
    public OperationLogVO entity2Vo(OperationLogEntity entity) {
        OperationLogVO vo = new OperationLogVO();
        BeanUtils.copyProperties(entity,vo);
        return vo;
    }

    @Override
    public OperationLogEntity vo2Entity(OperationLogVO vo) {
        OperationLogEntity entity = new OperationLogEntity();
        BeanUtils.copyProperties(vo, entity);
        return entity;
    }
}
